diff --git a/System/Snowflake.php b/System/Snowflake.php index ad7f8f57..a10f973f 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -382,6 +382,33 @@ class Snowflake } + /** + * @return bool + */ + public static function isTask(): bool + { + return static::getEnvironmental() == static::TASK; + } + + + /** + * @return bool + */ + public static function isWorker(): bool + { + return static::getEnvironmental() == static::WORKER; + } + + + /** + * @return bool + */ + public static function isProcess(): bool + { + return static::getEnvironmental() == static::PROCESS; + } + + /** * @param $class * @param $file