File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Devsrv \ScheduledAction \Console ;
4+ use Devsrv \ScheduledAction \Facades \Action ;
5+
6+ use Illuminate \Console \Command ;
7+
8+ class PollScheduledAction extends Command
9+ {
10+ /**
11+ * The name and signature of the console command.
12+ *
13+ * @var string
14+ */
15+ protected $ signature = 'scheduledaction:poll
16+ {--tasks=10 : How many tasks on each poll} ' ;
17+
18+ /**
19+ * The console command description.
20+ *
21+ * @var string
22+ */
23+ protected $ description = 'Poll scheduled model actions ' ;
24+
25+ /**
26+ * Create a new command instance.
27+ *
28+ * @return void
29+ */
30+ public function __construct ()
31+ {
32+ parent ::__construct ();
33+ }
34+
35+ /**
36+ * Execute the console command.
37+ *
38+ * @return int
39+ */
40+ public function handle ()
41+ {
42+ $ tasks = $ this ->option ('tasks ' ) ?? 10 ;
43+
44+ return Action::emit ($ tasks );
45+ }
46+ }
You can’t perform that action at this time.
0 commit comments