Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Laravel Job Queueで バッチ運用した話
Search
Takayuki
June 07, 2019
Programming
2
750
Laravel Job Queueで バッチ運用した話
Laravel Job Queueでバッチ運用した話
Takayuki
June 07, 2019
Tweet
Share
More Decks by Takayuki
See All by Takayuki
エンジニアのキャリア論
bumptakayuki
0
120
地方カンファレンス主催のススメ
bumptakayuki
1
160
Laravelで敢えて試す脆弱性のある書き方
bumptakayuki
1
790
地方でのPHPエンジニア採用って実際どうなの?
bumptakayuki
0
530
沖縄観光、名物を一挙紹介!
bumptakayuki
2
540
Laravel ShiftでLaravelのバージョンアップしてみた話
bumptakayuki
1
1.8k
flutterでイベントアプリを作ってみた
bumptakayuki
0
110
オフショア開発の辛みと学んだ事
bumptakayuki
0
340
ChatGPTにStripeのサンプルコードを書かせてみた
bumptakayuki
1
170
Other Decks in Programming
See All in Programming
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
120
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
1
120
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
350
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
1.1k
イベント駆動で成長して委員会
happymana
1
340
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.8k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
150
Better Code Design in PHP
afilina
PRO
0
130
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
For a Future-Friendly Web
brad_frost
175
9.4k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Ruby is Unlike a Banana
tanoku
97
11k
A better future with KSS
kneath
238
17k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
120
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Thoughts on Productivity
jonyablonski
67
4.3k
Transcript
Laravel Job QueueͰ όονӡ༻ͨ͠ Laravel Job QueueͰ όονӡ༻ͨ͠
3 όονӡ༻ͨ͠ Agenda 2 Job Queueͱ 1 ࣗݾհ
1 ࣗݾհ
4 ࣗݾհ ◆໊લ ླ ೭(Suzuki Takayuki) ◆ࣗݾհ ɾ1990ɺਆಸݝੜ·Εɻ ɾࣾձਓʹͳ͔ͬͯΒɺϓϩάϥϛϯάΛ࢝ΊΔɻ ɾ2015ʹϑϧεϐʔυʹೖࣾ͠ɺ2017ʹϑϦʔϥ
ϯεΛͬͨޙʹ201711݄ʹԭೄͰىۀɻ ◆झຯ ίεϓϨɺԻָϥΠϒɺϚϥιϯେձʹग़Δɺٿ؍ ઓ ◆Twitter @kanbo0605
Copyright Re:Build.inc All Rights Reserved. 1.ձࣾհ ◆ձ໊ࣾ גࣜձࣾRe:Build ◆ॅॴ ԭೄݝԭೄࢢதԝ̍ஸ̍̒−̕
◆ࣄۀ༰ ɾࣗࣾWEBαʔϏεͷاըɾ։ൃɻ ɾडୗ։ൃ ◆ࣾһ 5໊ ◆ΤϯδχΞͷಇ͖ํ ϦϞʔτϫʔΫՄೳͳࣗ༝ͳಇ͖ํΛਪͯ͠·͢ʂ
6 ࣗࣾWebαʔϏεͷ։ൃ ɾαʔϏε໊ Tadoru ɾγεςϜ֓ཁ Ϋϥυιʔγϯά ΫϨδοτܾࡁ ͳͲ ɾ͍ͬͯΔٕज़ ݴޠ
: PHP,JavaScript ϑϨʔϜϫʔΫ: laravel5,Nuxt.jsͳͲ
2 Job Queueͱ
8 2 Job Queueͱ δϣϒΩϡʔͱδϣϒΛΩϡʔͰཧ͢ ΔͷͰ͢ɻ ΩϡʔͱFIFO(First In First Out)Λ࣮ݱ
͢ΔσʔλߏͰ͢ɻ Ωϡʔʹొ͞ΕͨϞϊɺΩϡʔʹొ ͨ͠ॱʹॲཧ͞Ε·͢ɻ http://tech.voyagegroup.com/archives/495474.html
9
1 0
11
3 όονӡ༻ͨ͠
1 3 γεςϜͷػೳཁ݅ ɾຖɺεΫϨΠϐϯάॲཧΛ࣮ߦ ɾεΫϨΠϐϯάͨ݁͠ՌΛGoogleεϓϨουγʔτʹॻ͖ࠐΉ ɾେྔͷॲཧ͕ΔͷͰɺPHPϝϞϦΤϥʔʹͳΔՄೳੑ͕ߴ͍ ɾεϓϨουγʔτͷ݁ՌΛຖɺόοΫΞοϓ͢Δ ɾεϓϨουγʔτͷ݁ՌΛຖɺϝʔϧͰૹΔ
1 4 શମߏ εΫϨΠϐϯά αʔόαΠυ LaravelͷίϚϯ υΛ࣮ߦ औಘͨ͠σʔλΛ εϓϨουγʔτʹอଘ HTML
DOM Perser αΠτ εϓϨουγʔτ
cronͰຖே9࣌ʹ όον࣮ߦ Google ϫʔΧʔͰॱ࣮࣍ߦ εΫϨΠϐϯά ॲཧ GASͷAPIΛ࣮ߦ εΫϨΠϐϯά ͨ͠ใΛGASͷ ύϥϝʔλʹ֨ೲ
Job εΫϨΠϐϯά ॲཧ GASͷAPIΛ࣮ߦ εΫϨΠϐϯά ͨ͠ใΛGASͷ ύϥϝʔλʹ֨ೲ Job Queue εΫϨΠϐϯά ॲཧ GASͷAPIΛ࣮ߦ εΫϨΠϐϯά ͨ͠ใΛGASͷ ύϥϝʔλʹ֨ೲ Job ϫʔΧʔ ࣮ߦ݁Ռͷ εςʔλε Λฦ٫ GASͷAPI Λ࣮ߦ εϓϨου γʔτॻ͖ ग़͠ Supervisor ϫʔΧʔ͕ࢮΜͩΒ ্ཱͪ͛͢ શମߏ δϣϒΛ3ͭ࡞͠ ͨ߹
1 6 ࣮ͨ͠༰ ᶃεέδϡʔϥͷઃఆ ᶄόονίϚϯυΫϥεͷ࡞ ᶅδϣϒΩϡʔͷΈΛ࣮ ᶆGASͰεϓϨουγʔτॻ͖ࠐΈͷॲཧΛ࣮ ᶇsupervisorͷઃఆ
1 7 ᶃεέδϡʔϥͷઃఆ Kernel.phpʹே9࣌ͰόονΛಈ ͘Α͏ʹઃఆ
1 8 ᶄόονίϚϯυΫϥεͷ࡞ ίϚϯυͰͷॲཧ ɾຊͷδϣϒΩϡʔΛ٧ΊΔ ɾલͷδϣϒͷ࣮ߦ݁ՌΛϝʔ ϧͰૹΔ
1 9 ᶅδϣϒΩϡʔͷΈΛ࣮
2 0 ᶆGASͰεϓϨουγʔτॻ͖ࠐΈͷॲཧΛ࣮ PHP͔ΒύϥϝʔλΛऔಘ
2 1 ᶆGASͰεϓϨουγʔτॻ͖ࠐΈͷॲཧΛ࣮ ExcelϑΝΠϧΛ࡞ͯ͠ɺϝʔϧૹ৴
2 2 ᶆGASͰεϓϨουγʔτॻ͖ࠐΈͷॲཧΛ࣮ ExcelϑΝΠϧΛ࡞ͯ͠ɺGoogleυϥΠϒʹόοΫΞοϓ
2 3 ᶇsupervisorͷઃఆ
2 4 ࠂ 10/12 PHPΧϯϑΝϨϯεԭೄ։࠵͠·͢ʂ