SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/worker_job_manual_run.php

  1. <?php
  2. use Sprout\Helpers\Csrf;
  3. use Sprout\Helpers\Form;
  4. ?>
  5.  
  6.  
  7. <div class="info">
  8. This tool will manually run a worker job class from within a browser request.
  9. Note that as they're running in a browser, the jobs may run out of ram or execution time.
  10. </div>
  11.  
  12.  
  13. <form action="admin/call/worker_job/manualRunAction" method="post">
  14. <?= Csrf::token(); ?>
  15.  
  16. <?php
  17. Form::nextFieldDetails('Worker class', true, 'This must include the namespace');
  18. echo Form::text('class_name', ['placeholder' => 'e.g. Sprout\\Helpers\\WorkerLinkChecker'], []);
  19. ?>
  20.  
  21. <?php
  22. Form::nextFieldDetails('Arguments', false, 'Provide this as a JSON array');
  23. echo Form::multiline('args', ['placeholder' => 'e.g. [ "test@example.com" ]', 'rows' => 5], []);
  24. ?>
  25.  
  26.  
  27. <div class="action-log">
  28. <button class="button" type="submit">Run worker job</button>
  29. </div>
  30. </form>