Amfani Laravel Horizon don Gudanar da Queue

Laravel Horizon kayan aiki ne mai ƙarfi wanda ke ba ka damar sarrafa layukan layi yadda yakamata da aiwatar da ayyuka cikin sauƙi. Tare da Horizon, zaku iya saka idanu, daidaitawa, da kuma daidaita tsarin layin ku don gudanar da ayyuka yadda ya kamata, tabbatar da sarrafa aiki mai santsi a cikin Laravel aikace-aikacenku.

 

Mabuɗin Amfanin Amfani Laravel Horizon

Kulawa na Gaskiya

Horizon yana ba da dashboard na ainihi wanda ke ba ku damar saka idanu da matsayi da aikin layinku da ayyukanku. Kuna iya sauƙin bin diddigin adadin ayyukan da ake jira, kammalawa, da gazawar ayyukan yi, da lokacin sarrafawa da fitar da kowane jerin gwano.

Gudanar da jerin gwano

Horizon yana sauƙaƙa gudanar da layukan ku ta hanyar samar da hanyar sadarwa mai sauƙin amfani don sarrafa layukan da ba da fifikon ayyuka. Kuna iya sauƙaƙe dakatarwa, ci gaba, da daidaita jerin gwano, yana sauƙaƙa sarrafa nau'ikan ayyuka daban-daban da ba da fifikon ayyuka masu mahimmanci.

Ingantacciyar Gudanar da Ayyukan Aiki

Horizon yana taimakawa inganta sarrafa aiki ta hanyar ba da damar Laravel sarrafa ma'aikatan layin masu ƙarfi. Yana ba ku damar ƙididdige adadin ma'aikata da matakan da za a ware don kowane jerin gwano, tabbatar da cewa an sarrafa ayyukan da kyau da kuma rarraba a ko'ina cikin albarkatun da ake da su.

Supervisor Haɗin kai

Horizon ba tare da matsala ba tare da Supervisor, tsarin sarrafa tsari don tsarin aiki kamar Unix. Supervisor yana tabbatar da cewa ma'aikatan layinku koyaushe suna kan aiki, koda kuwa sun yi karo ko kuma sun tsaya ba zato ba tsammani, yana ƙara amincin sarrafa layinku.

 

Farawa da Laravel Horizon

Don amfani Laravel Horizon, kuna buƙatar bi waɗannan matakan:

Mataki 1: Shigar Laravel Horizon ta hanyar Composer: Gudanar da umarni mai zuwa a cikin Laravel kundin aikin ku don shigar da Horizon.

composer require laravel/horizon

Mataki 2: Buga Kanfigareshan: Bayan shigarwa, buga Horizon fayil ɗin sanyi ta amfani da umarnin Artisan mai zuwa.

php artisan horizon:install

Mataki 3: Sanya Horizon Dashboard: Horizon ya zo tare da dashboard na ainihi don sa ido kan layukan. Kuna iya saita dashboard ɗin zuwa ga abin da kuke so kuma ku sami amintaccen damar yin amfani da shi tare da tantancewa.

Mataki 4: Fara Horizon Supervisor: Don fara sarrafa layukan ta amfani da Horizon, gudanar da umarni mai zuwa.

php artisan horizon

Tare da Laravel Horizon saiti, zaku iya sarrafawa da saka idanu akan layukanku cikin sauƙi, haɓaka sarrafa aiki, da tabbatar da ingantaccen aiki na aikace Laravel -aikacenku.

 

Lura: Don yanayin samarwa, yana da mahimmanci don daidaitawa Supervisor don sarrafa Horizon ma'aikata da tabbatar da ci gaba da sarrafa layi.