403Webshell
Server IP : 185.143.234.238  /  Your IP : 185.215.232.195
Web Server : LiteSpeed
System : Linux saman.shetabanhost.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User : behrakir ( 1361)
PHP Version : 8.1.34
Disable Function : symlink,shell_exec,show_source,exec,popen,system,passthru,proc_open,proc_close,pcntl_exec,mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/behrakir/khanomam.com/wp-content/plugins/sync-basalam/includes/Jobs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/behrakir/khanomam.com/wp-content/plugins/sync-basalam/includes/Jobs/LockManager.php
<?php

namespace SyncBasalam\Jobs;

defined('ABSPATH') || exit;

class LockManager
{
    public function acquire(string $jobType, int $timeout = 0): bool
    {
        return $this->acquireNamedLock('sync_basalam_job_' . $jobType, $timeout);
    }

    public function release(string $jobType): bool
    {
        return $this->releaseNamedLock('sync_basalam_job_' . $jobType);
    }

    public function acquireGlobalJobsLock(int $timeout = 0): bool
    {
        return $this->acquireNamedLock('sync_basalam_jobs_runner', $timeout);
    }

    public function releaseGlobalJobsLock(): bool
    {
        return $this->releaseNamedLock('sync_basalam_jobs_runner');
    }

    private function acquireNamedLock(string $lockName, int $timeout = 0): bool
    {
        global $wpdb;

        $result = $wpdb->get_var($wpdb->prepare("SELECT GET_LOCK(%s, %d)", $lockName, $timeout));

        return $result === '1';
    }

    private function releaseNamedLock(string $lockName): bool
    {
        global $wpdb;

        $result = $wpdb->get_var($wpdb->prepare("SELECT RELEASE_LOCK(%s)", $lockName));

        return $result === '1';
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit