HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/doc/python3-django-q/html/admin.html
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Admin pages &mdash; Django Q2 1.6.1 documentation</title>
      <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b76e3c8a" />
      <link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=86f27845" />

  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
        <script src="_static/jquery.js?v=8dae8fb0"></script>
        <script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
        <script src="_static/documentation_options.js?v=d6a008b6"></script>
        <script src="_static/doctools.js?v=888ff710"></script>
        <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="_static/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Errors" href="errors.html" />
    <link rel="prev" title="Monitor" href="monitor.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="index.html" class="icon icon-home">
            Django Q2
          </a>
              <div class="version">
                1.6
              </div>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html"> Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configure.html"> Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="brokers.html"> Brokers</a></li>
<li class="toctree-l1"><a class="reference internal" href="tasks.html"> Tasks</a></li>
<li class="toctree-l1"><a class="reference internal" href="group.html"> Groups</a></li>
<li class="toctree-l1"><a class="reference internal" href="iterable.html"> Iterable</a></li>
<li class="toctree-l1"><a class="reference internal" href="chain.html"> Chains</a></li>
<li class="toctree-l1"><a class="reference internal" href="schedules.html"> Schedules</a></li>
<li class="toctree-l1"><a class="reference internal" href="cluster.html"> Cluster</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitor.html"> Monitor</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#"> Admin</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#successful-tasks">Successful tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="#failed-tasks">Failed tasks</a></li>
<li class="toctree-l2"><a class="reference internal" href="#scheduled-tasks">Scheduled tasks</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#repeats">Repeats</a></li>
<li class="toctree-l3"><a class="reference internal" href="#next-run">Next run</a></li>
<li class="toctree-l3"><a class="reference internal" href="#last-run">Last run</a></li>
<li class="toctree-l3"><a class="reference internal" href="#success">Success</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#queued-tasks">Queued tasks</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="errors.html"> Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="signals.html"> Signals</a></li>
<li class="toctree-l1"><a class="reference internal" href="architecture.html"> Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html"> Examples</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">Django Q2</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">Admin pages</li>
      <li class="wy-breadcrumbs-aside">
            <a href="_sources/admin.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="admin-pages">
<span id="admin-page"></span><h1>Admin pages<a class="headerlink" href="#admin-pages" title="Link to this heading"></a></h1>
<p>Django Q2 does not use custom pages, but instead leverages what is offered by Django’s model admin by default.
When you open Django Q2’s admin pages you will see three models:</p>
<section id="successful-tasks">
<h2>Successful tasks<a class="headerlink" href="#successful-tasks" title="Link to this heading"></a></h2>
<p>Shows all successfully executed tasks. Meaning they did not encounter any errors during execution.
From here you can look at details of each task or delete them. Use the group filter to filter your results by schedule name or group id.
The table is searchable by <cite>name</cite>, <cite>func</cite> and <cite>group</cite></p>
<img alt="_images/successful.png" src="_images/successful.png" />
<p>Uses the <a class="reference internal" href="tasks.html#django_q.Success" title="django_q.Success"><code class="xref py py-class docutils literal notranslate"><span class="pre">Success</span></code></a> proxy model.</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>The maximum number of successful tasks can be set using the <a class="reference internal" href="configure.html#save-limit"><span class="std std-ref">save_limit</span></a> option.</p>
</div>
</section>
<section id="failed-tasks">
<h2>Failed tasks<a class="headerlink" href="#failed-tasks" title="Link to this heading"></a></h2>
<p>Failed tasks have encountered an error, preventing them from finishing execution.
The worker will try to put the error in the <cite>result</cite> field of the task so you can review what happened.</p>
<p>You can resubmit a failed task back to the queue using the admins action menu.</p>
<p>Uses the <a class="reference internal" href="tasks.html#django_q.Failure" title="django_q.Failure"><code class="xref py py-class docutils literal notranslate"><span class="pre">Failure</span></code></a> proxy model</p>
<p>Customize the admin UI by creating your own <code class="docutils literal notranslate"><span class="pre">admin.ModelAdmin</span></code> class and use <code class="docutils literal notranslate"><span class="pre">admin.site.unregister</span></code> and <code class="docutils literal notranslate"><span class="pre">admin.site.register</span></code> to replace the default
for example:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django_q</span> <span class="kn">import</span> <span class="n">models</span> <span class="k">as</span> <span class="n">q_models</span>
<span class="kn">from</span> <span class="nn">django_q</span> <span class="kn">import</span> <span class="n">admin</span> <span class="k">as</span> <span class="n">q_admin</span>

<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">unregister</span><span class="p">([</span><span class="n">q_models</span><span class="o">.</span><span class="n">Failure</span><span class="p">])</span>
<span class="nd">@admin</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">q_models</span><span class="o">.</span><span class="n">Failure</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">ChildClassAdmin</span><span class="p">(</span><span class="n">q_admin</span><span class="o">.</span><span class="n">FailAdmin</span><span class="p">):</span>
    <span class="n">list_display</span> <span class="o">=</span> <span class="p">(</span>
        <span class="s1">&#39;name&#39;</span><span class="p">,</span>
        <span class="s1">&#39;func&#39;</span><span class="p">,</span>
        <span class="s1">&#39;result&#39;</span><span class="p">,</span>
        <span class="s1">&#39;started&#39;</span><span class="p">,</span>
        <span class="c1"># add attempt_count to list_display</span>
        <span class="s1">&#39;attempt_count&#39;</span>
    <span class="p">)</span>
</pre></div>
</div>
</section>
<section id="scheduled-tasks">
<h2>Scheduled tasks<a class="headerlink" href="#scheduled-tasks" title="Link to this heading"></a></h2>
<p>Here you can check on the status of your scheduled tasks, create, edit or delete them.</p>
<img alt="_images/scheduled.png" src="_images/scheduled.png" />
<section id="repeats">
<h3>Repeats<a class="headerlink" href="#repeats" title="Link to this heading"></a></h3>
<p>If you want a schedule to only run a finite amount of times, e.g. every hour for the next 24 hours, you can do that using the <a class="reference internal" href="schedules.html#django_q.Schedule.repeats" title="django_q.Schedule.repeats"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Schedule.repeats</span></code></a> attribute.
In this case you would set the schedule type to <a class="reference internal" href="schedules.html#django_q.Schedule.HOURLY" title="django_q.Schedule.HOURLY"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Schedule.HOURLY</span></code></a> and the repeats to <cite>24</cite>. Every time the schedule runs the repeats count down until it hits zero and schedule is no longer run.</p>
<p>When you set repeats to <code class="docutils literal notranslate"><span class="pre">-1</span></code> the schedule will continue indefinitely and the repeats will still count down. This can be used as an indicator of how many times the schedule has been executed.</p>
<p>An exception to this are schedules of type <a class="reference internal" href="schedules.html#django_q.Schedule.ONCE" title="django_q.Schedule.ONCE"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Schedule.ONCE</span></code></a>. Negative repeats for this schedule type will cause it to be deleted from the database.
This behavior is useful if you have many delayed actions which you do not necessarily need a result for. A positive number will keep the ONCE schedule, but it will not run again.</p>
<p>You can pause a schedule by setting its repeats value to zero.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>To run a <code class="docutils literal notranslate"><span class="pre">ONCE</span></code> schedule again, change the repeats to something other than <cite>0</cite>. Set a new run time before you do this or let it execute immediately.</p>
</div>
</section>
<section id="next-run">
<h3>Next run<a class="headerlink" href="#next-run" title="Link to this heading"></a></h3>
<p>Shows you when this task will be added to the queue next.</p>
</section>
<section id="last-run">
<h3>Last run<a class="headerlink" href="#last-run" title="Link to this heading"></a></h3>
<p>Links to the task result of the last scheduled run. Shows nothing if the schedule hasn’t run yet or if task result has been deleted.</p>
</section>
<section id="success">
<h3>Success<a class="headerlink" href="#success" title="Link to this heading"></a></h3>
<p>Indicates the success status of the last scheduled task, if any.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>if you have set the <a class="reference internal" href="configure.html#save-limit"><span class="std std-ref">save_limit</span></a> configuration option to not save successful tasks to the database, you will only see the failed results of your schedules.</p>
</div>
<p>Uses the <a class="reference internal" href="schedules.html#django_q.Schedule" title="django_q.Schedule"><code class="xref py py-class docutils literal notranslate"><span class="pre">Schedule</span></code></a> model</p>
</section>
</section>
<section id="queued-tasks">
<h2>Queued tasks<a class="headerlink" href="#queued-tasks" title="Link to this heading"></a></h2>
<p>This admin view is only enabled when you use the <a class="reference internal" href="brokers.html#orm-broker"><span class="std std-ref">Django ORM</span></a> broker.
It shows all tasks packages currently in the broker queue. The <code class="docutils literal notranslate"><span class="pre">lock</span></code> column shows the moment at which this package was picked up by the cluster and is used to determine whether it has expired or not.
For development purposes you can edit and delete queued tasks from here.</p>
</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="monitor.html" class="btn btn-neutral float-left" title="Monitor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="errors.html" class="btn btn-neutral float-right" title="Errors" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2015-2023, Ilan Steemers - 2022, Stan Triepels.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>