PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backups, Restore, Migration & Clone / 4.11.1
WP STAGING – WordPress Backups, Restore, Migration & Clone v4.11.1
4.11.1 4.11.0 4.10.0 4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / Backend / Modules / Jobs / ProcessLock.php
wp-staging / Backend / Modules / Jobs Last commit date
Cleaners 1 week ago Exceptions 1 week ago Cancel.php 1 week ago CancelUpdate.php 1 week ago Cloning.php 6 days ago CloningProcess.php 1 week ago Data.php 1 week ago Database.php 6 days ago Delete.php 1 week ago Directories.php 1 week ago Files.php 1 week ago Finish.php 1 week ago Job.php 6 days ago JobExecutable.php 1 week ago Logs.php 1 week ago PreserveDataFirstStep.php 1 week ago PreserveDataSecondStep.php 1 week ago ProcessLock.php 1 week ago Scan.php 1 week ago SearchReplace.php 1 week ago TotalStepsAreNumberOfTables.php 1 week ago Updating.php 6 days ago
ProcessLock.php
86 lines
1 <?php
2
3 namespace WPStaging\Backend\Modules\Jobs;
4
5
6
7
8
9 class ProcessLock extends JobExecutable
10 {
11
12
13
14
15
16 public function isRunning()
17 {
18
19 if (parent::isRunning()) {
20 $this->log("Another process is running");
21
22 $message = __('Hold on, another WP STAGING process is already running...', 'wp-staging');
23
24 require_once WPSTG_VIEWS_DIR . "clone/ajax/process-lock.php";
25
26 wp_die();
27 }
28
29
30
31 return false;
32 }
33
34
35
36
37
38
39
40 public function ajaxIsRunning()
41 {
42 if (parent::isRunning()) {
43 return [
44 'success' => false,
45 'type' => 'processLock',
46
47 'swalOptions' => [
48 'title' => __('Error!', 'wp-staging'),
49 'html' => __('Hold on, another WP STAGING process is already running...', 'wp-staging'),
50 'confirmButtonText' => __('Stop other process', 'wp-staging'),
51 'showCancelButton' => true,
52 ],
53 ];
54 }
55
56 return false;
57 }
58
59
60
61
62 public function restart()
63 {
64 unset($this->options->isRunning);
65 $this->cloneOptionCache->delete();
66 $this->filesIndexCache->delete();
67 }
68
69
70
71
72
73 protected function calculateTotalSteps()
74 {
75 }
76
77
78
79
80
81 protected function execute()
82 {
83 return false;
84 }
85 }
86