File tree 1 file changed +13
-14
lines changed
src/Illuminate/Console/Scheduling
1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Console \Application ;
6
6
use Illuminate \Container \Container ;
7
- use Illuminate \Contracts \Queue \ShouldQueue ;
8
7
use Symfony \Component \Process \ProcessUtils ;
9
8
use Illuminate \Contracts \Cache \Repository as Cache ;
10
9
@@ -49,19 +48,6 @@ public function call($callback, array $parameters = [])
49
48
return $ event ;
50
49
}
51
50
52
- /**
53
- * Add a new queued job callback event to the schedule.
54
- *
55
- * @param \Illuminate\Contracts\Queue\ShouldQueue $job
56
- * @return \Illuminate\Console\Scheduling\Event
57
- */
58
- public function job (ShouldQueue $ job )
59
- {
60
- return $ this ->call (function () use ($ job ) {
61
- dispatch ($ job );
62
- })->name (get_class ($ job ));
63
- }
64
-
65
51
/**
66
52
* Add a new Artisan command event to the schedule.
67
53
*
@@ -80,6 +66,19 @@ public function command($command, array $parameters = [])
80
66
);
81
67
}
82
68
69
+ /**
70
+ * Add a new job callback event to the schedule.
71
+ *
72
+ * @param object|string $job
73
+ * @return \Illuminate\Console\Scheduling\Event
74
+ */
75
+ public function job ($ job )
76
+ {
77
+ return $ this ->call (function () use ($ job ) {
78
+ dispatch (is_string ($ job ) ? resolve ($ job ) : $ job );
79
+ })->name (is_string ($ job ) ? $ job : get_class ($ job ));
80
+ }
81
+
83
82
/**
84
83
* Add a new command event to the schedule.
85
84
*
You can’t perform that action at this time.
0 commit comments