You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.1 KiB

Graceful Queues: Issue Indexing and Tasks (#9363) * Queue: Add generic graceful queues with settings * Queue & Setting: Add worker pool implementation * Queue: Add worker settings * Queue: Make resizing worker pools * Queue: Add name variable to queues * Queue: Add monitoring * Queue: Improve logging * Issues: Gracefulise the issues indexer Remove the old now unused specific queues * Task: Move to generic queue and gracefulise * Issues: Standardise the issues indexer queue settings * Fix test * Queue: Allow Redis to connect to unix * Prevent deadlock during early shutdown of issue indexer * Add MaxWorker settings to queues * Merge branch 'master' into graceful-queues * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_disk.go * Update modules/queue/queue_disk_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Rename queue.Description to queue.ManagedQueue as per @guillep2k * Cancel pool workers when removed * Remove dependency on queue from setting * Update modules/queue/queue_redis.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * As per @guillep2k add mutex locks on shutdown/terminate * move unlocking out of setInternal * Add warning if number of workers < 0 * Small changes as per @guillep2k * No redis host specified not found * Clean up documentation for queues * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md * Update modules/indexer/issues/indexer_test.go * Ensure that persistable channel queue is added to manager * Rename QUEUE_NAME REDIS_QUEUE_NAME * Revert "Rename QUEUE_NAME REDIS_QUEUE_NAME" This reverts commit 1f83b4fc9b9dabda186257b38c265fe7012f90df. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago
  1. {{template "base/head" .}}
  2. <div class="admin monitor">
  3. {{template "admin/navbar" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h4 class="ui top attached header">
  7. {{.i18n.Tr "admin.monitor.cron"}}
  8. </h4>
  9. <div class="ui attached table segment">
  10. <table class="ui very basic striped table">
  11. <thead>
  12. <tr>
  13. <th>{{.i18n.Tr "admin.monitor.name"}}</th>
  14. <th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
  15. <th>{{.i18n.Tr "admin.monitor.next"}}</th>
  16. <th>{{.i18n.Tr "admin.monitor.previous"}}</th>
  17. <th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. {{range .Entries}}
  22. <tr>
  23. <td>{{.Description}}</td>
  24. <td>{{.Spec}}</td>
  25. <td>{{DateFmtLong .Next}}</td>
  26. <td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
  27. <td>{{.ExecTimes}}</td>
  28. </tr>
  29. {{end}}
  30. </tbody>
  31. </table>
  32. </div>
  33. <h4 class="ui top attached header">
  34. {{.i18n.Tr "admin.monitor.queues"}}
  35. </h4>
  36. <div class="ui attached table segment">
  37. <table class="ui very basic striped table">
  38. <thead>
  39. <tr>
  40. <th>{{.i18n.Tr "admin.monitor.queue.name"}}</th>
  41. <th>{{.i18n.Tr "admin.monitor.queue.type"}}</th>
  42. <th>{{.i18n.Tr "admin.monitor.queue.exemplar"}}</th>
  43. <th>{{.i18n.Tr "admin.monitor.queue.numberworkers"}}</th>
  44. <th></th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. {{range .Queues}}
  49. <tr>
  50. <td>{{.Name}}</td>
  51. <td>{{.Type}}</td>
  52. <td>{{.ExemplarType}}</td>
  53. <td>{{$sum := .NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
  54. <td><a href="{{$.Link}}/queue/{{.QID}}" class="button">{{if lt $sum 0}}{{$.i18n.Tr "admin.monitor.queue.review"}}{{else}}{{$.i18n.Tr "admin.monitor.queue.review_add"}}{{end}}</a>
  55. </tr>
  56. {{end}}
  57. </tbody>
  58. </table>
  59. </div>
  60. <h4 class="ui top attached header">
  61. {{.i18n.Tr "admin.monitor.process"}}
  62. </h4>
  63. <div class="ui attached table segment">
  64. <table class="ui very basic striped table">
  65. <thead>
  66. <tr>
  67. <th>Pid</th>
  68. <th>{{.i18n.Tr "admin.monitor.desc"}}</th>
  69. <th>{{.i18n.Tr "admin.monitor.start"}}</th>
  70. <th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
  71. <th></th>
  72. </tr>
  73. </thead>
  74. <tbody>
  75. {{range .Processes}}
  76. <tr>
  77. <td>{{.PID}}</td>
  78. <td>{{.Description}}</td>
  79. <td>{{DateFmtLong .Start}}</td>
  80. <td>{{TimeSince .Start $.Lang}}</td>
  81. <td><a class="delete-button" href="" data-url="{{$.Link}}/cancel/{{.PID}}" data-id="{{.PID}}" data-name="{{.Description}}"><i class="close icon text red"></i></a></td>
  82. </tr>
  83. {{end}}
  84. </tbody>
  85. </table>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="ui small basic delete modal">
  90. <div class="ui icon header">
  91. <i class="close icon"></i>
  92. {{.i18n.Tr "admin.monitor.process.cancel"}}
  93. </div>
  94. <div class="content">
  95. <p>{{$.i18n.Tr "admin.monitor.process.cancel_notices" `<span class="name"></span>` | Safe}}</p>
  96. <p>{{$.i18n.Tr "admin.monitor.process.cancel_desc"}}</p>
  97. </div>
  98. {{template "base/delete_modal_actions" .}}
  99. </div>
  100. {{template "base/footer" .}}